home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Die Speccy' 97
/
Die Speccy' 97.iso
/
amiga_system
/
the_aminet
/
comm
/
fido
/
tdisp11.lha
/
TrapDispatcher
/
Rexx
/
CallExist.rexx
next >
Wrap
OS/2 REXX Batch file
|
1994-11-15
|
2KB
|
73 lines
/*
CallExist.rexx 1.2
Calls a node using TrapDispatcher if there is netmail, echomail or
filerequests for that node. CallExist.rexx won't call if there only
is mail on hold, of course.
CallExist only recognizes a 4D-style outbound directory, that is the
files should be named zone.net.node.point.*. Does anybode use the old
2D-style anyway?
New in 1.1:
Parameters passes on command-line after the node number will be
passed on to TrapDispatcher. That means that you can do this:
rx CallExist.rexx 2:203/600 RETRIES 100
New in 1.2:
Now shows the result string if an error occurs. Requires
TrapDispatcher 1.1.
*/
/* Change these to suit your system */
dispatchport="TRAPDISPATCHER"
outbound="MAIL:Outbound"
/* Real script starts here */
options results
options failat 11 /* Don't show error 10 in CLI... */
if right(outbound,1)~=":" & right(outbound,1)~="/" then
outbound=outbound || '/'
parse arg node" "opt
parse var node zone":"net"/"node"."point
if point="" then point=0
basename=outbound || zone"."net"."node"."point
call=FALSE
if exists(basename || ".FLO") then call=TRUE
if exists(basename || ".CLO") then call=TRUE
if exists(basename || ".DLO") then call=TRUE
if exists(basename || ".OUT") then call=TRUE
if exists(basename || ".CUT") then call=TRUE
if exists(basename || ".DUT") then call=TRUE
if exists(basename || ".REQ") then call=TRUE
addr=zone":"net"/"node"."point
if call=TRUE then do
address value dispatchport
'call 'addr' 'opt
if rc~=0 then do
geterror
say "Call failed:" result
end
end
else do
say "No mail, won't call "addr"..."
end